import Vue from "vue";
import VueRouter from "vue-router";
// import routes from "./routes";

import Home from "@/pages/Home";
import Search from "@/pages/Search";
import Login from "@/pages/Login";
import Register from "@/pages/Register";
import NotFound from "@/pages/404";

Vue.use(VueRouter);
const router = new VueRouter({
    mode: "history",
    routes: [
        {
            path: "/",
            redirect: "/home",
        },
        {
            path: "/home",
            component: Home,
            name: "Home",
        },
        {
            path: "/search",
            component: Search,
            name: "Search",
        },
        {
            path: "/login",
            component: Login,
            name: "Login",
            meta: {
                isHidden: true,

            }
        },
        {
            path: "/register",
            component: Register,
            name: "Register",
        },
        {
            path: "/*",
            component: NotFound,
        },
    ]
})
export default router;